namespace MvpFramework
{
    /// <summary>
    /// Extensions for IMvpView
    /// </summary>
    public static class IMvpViewExtensions
    {
        /// <summary>
        /// Returns the Correct presenter for the view
        /// </summary>
        /// <param name="view"></param>
        /// <returns></returns>
        public static object GetPresenter(this IMvpView view)
        {
            var presenterFactory = new PresenterFactory();
            return presenterFactory.GetPresenterFor(view);
        }
    }
}